package com.rslai.base.tool.servertest.config;

import com.rslai.base.tool.servertest.annotation.ConfigElement;
import com.rslai.base.tool.servertest.annotation.Property;
import com.rslai.base.tool.servertest.command.EchoCommand;
import com.rslai.base.tool.servertest.command.StepCommand;
import com.rslai.base.tool.servertest.model.KeyValueStore;

import java.util.Arrays;

@ConfigElement(defaultProperty = "value")
public class EchoConfig extends StepConfig {

    @Property
    private String value;

    public StepCommand createCommand() {
        return new EchoCommand(Arrays.asList(new KeyValueStore[]{new KeyValueStore("value", this.value)}));
    }
}
